<?
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/
?>
<p class="categoryheader"><?=$pageParams["title"];?> <? if ($type=="edit") { ?> -- <i><?=$modInfo["name"];?></i><? } ?></p>
<form method="post" action="/monitor/query_module.php" name="bdform" id="bdform">

<table border="0" cellpadding="5" cellspacing="1" width="98%">
<tr valign="top">
<td>

<table border="0" cellpadding="5" cellspacing="1" class="formtable">
<tr valign="top">
	<td class="formfielddesc">Name<br />
		<span class="required">{required}</span></td>
	<td class="formfield">
		<input type="text" value="<?=$modInfo["name"];?>" name="name" class="textfield" />
	</td>
</tr>
<tr valign="top">
	<td class="formfielddesc">File Name<br />
		<span class="required">{required}</span></td>
	<td class="formfield">
		<input type="text" value="<?=$modInfo["filename"];?>" name="filename" class="textfield" />
	</td>
</tr>
<tr valign="top">
	<td class="formfielddesc">Notes<br />
	</td>
	<td class="formfield">
		<textarea name="notes" class="textareafield"><?=$modInfo["notes"];?></textarea>
	</td>
</tr>
</table>

</td>
<td>

<table border="0" cellpadding="5" cellspacing="1"  class="formtable">
<tr valign="top">
	<td class="formfielddesc">Return Type<br />
		<span class="required">{required}</span></td>
	<td class="formfield">
		<select name="type" size="1" class="selectfield">
			<option value="1"<? if ($modInfo["type"]==1) echo " selected";?>>Boolean (0 or 1)</option>
			<option value="2"<? if ($modInfo["type"]==2) echo " selected";?>>Some String to be Evaluated</option>
		</select>
	</td>
</tr>
<tr valign="top">
	<td class="formfielddesc">Run Module From<br />
		<span class="required">{required}</span></td>
	<td class="formfield">
		<select name="runfrom" size="1" class="selectfield">
			<option value="1"<? if ($modInfo["runfrom"]==1) echo " selected";?>>External (Server Only)</option>
			<option value="2"<? if ($modInfo["runfrom"]==2) echo " selected";?>>Internal (Client Only)</option>
		</select>
	</td>
</tr>
<tr valign="top">
	<td class="formfielddesc">Distribute to Client?<br />
		<span class="required">{required}</span></td>
	<td class="formfield">
		<select name="distribute" size="1" class="selectfield">
			<option value="0"<? if ($modInfo["distribute"]==0) echo " selected";?>>No</option>
			<option value="1"<? if ($modInfo["distribute"]==1) echo " selected";?>>Yes</option>
		</select>
	</td>
</tr>
</table>

</td>
</tr>

<tr valign="top">
	<td class="formfielddesc" colspan="2">
	<div align="center"><?
	if ($type=="addnew")
	{
	?>
		<input type="hidden" name="action" value="addmod" />
	<?
	}
	
	if ($type=="edit")
	{
	?>
		<input type="hidden" name="action" value="editmod" />
		<input type="hidden" name="modID" value="<?=$_REQUEST["modID"];?>" />
	<?
	}
	?></div>
	
	</td>
</tr>
</table>

<br />



</form>
